package com.yzp.controller;

import com.yzp.config.OrderConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @title: IndexController
 * @Author: yzp
 * @Date: 2019/9/30 22:21
 * @Version 1.0
 */
@RestController
public class IndexController {
    @Autowired
    private OrderConfig orderConfig;

    @Value("${name}")
    public  String NAME;

    @RequestMapping("/name")
    private String name() {
        System.out.println(orderConfig.NAME);
        System.out.println(NAME);
        return orderConfig.NAME;
    }
}
